<template>
  <ul class="breadcrumb">
    <li v-for="(item, index) in data" :key="index" class="breadcrumb--item">
      <span v-if="item.isExact" class="is-exact">{{ item.label }}</span>
      <template v-else>
        <router-link v-if="item.path" :to="item.path">{{ item.label }}</router-link>
        <span v-else>{{ item.label }}</span>
      </template>
    </li>
  </ul>
</template>
<script>
import './breadcrumb.less'

export default {
  props: {
    data: {
      type: Array,
      default () {
        return []
      }
    }
  }
}
</script>
